package com.flamingskys.learn.rag.es.repository;

import com.flamingskys.learn.rag.es.entity.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import java.util.List;

public interface ProductRepository extends ElasticsearchRepository<Product, String> {
    List<Product> findByName(String name);
    Page<Product> findByName(String name, Pageable pageable);
    List<Product> findByPriceBetween(Double minPrice, Double maxPrice);
}